﻿@using Microsoft.Owin.Security

@if (ViewBag.HeaderIgnore == null) { 
    <h4>Lépj be már létező fiókoddal.</h4>
    <hr />
}
@{
    var loginProviders = Context.GetOwinContext().Authentication.GetExternalAuthenticationTypes();
    if (loginProviders.Count() == 0)
    {
        
    }
    else
    {
        string action = Model.Action;
        string returnUrl = Model.ReturnUrl;
        using (Html.BeginForm(action, "Account", new { ReturnUrl = returnUrl }))
        {
            @Html.AntiForgeryToken()
            <div id="socialLoginList">
                <p>
                @foreach (AuthenticationDescription p in loginProviders)
                {
                    <button type="submit" class="btn btn-primary" id="@p.AuthenticationType" name="provider" value="@p.AuthenticationType" title="Lépj be a @p.Caption fiókoddal">@p.AuthenticationType</button>
                }
                </p>
            </div>
        }
    }
}
